package com.atguigu.lease.web.admin.mapper;

import com.atguigu.lease.model.entity.RoomInfo;
import com.atguigu.lease.web.admin.vo.room.RoomDetailVo;
import com.atguigu.lease.web.admin.vo.room.RoomItemVo;
import com.atguigu.lease.web.admin.vo.room.RoomQueryVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * @author xiongkunYang
 * @description 针对表【room_info(房间信息表)】的数据库操作Mapper
 * @createDate 2025-04-19 22:27:34
 * @Entity com.atguigu.lease.model.entity.RoomInfo
 */
@Mapper
public interface RoomInfoMapper extends BaseMapper<RoomInfo> {

    /**
     * 根据条件分页查询房间列表
     *
     * @param page 分页对象，用于封装分页信息和数据
     * @param queryVo 查询条件对象，包含各种查询参数
     * @return 填充了房间信息的分页对象
     */
    IPage<RoomItemVo> selectRoomItemPageByQuery(@Param("page") Page<RoomItemVo> page,
                                                @Param("queryVo")RoomQueryVo queryVo);

    /**
     * 根据房间ID查询房间详细信息
     *
     * @param id 房间ID
     * @return 包含房间详细信息的实体对象
     */
    RoomDetailVo selectRoomDetailById(Long id);
}




